package com.example.systemend.controller;

import com.example.systemend.pojo.Pie;
import com.example.systemend.pojo.SevenDay;
import com.example.systemend.service.EchartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 权哥
 * @version 1.0
 * @date 2022/6/7 11:47
 */
@RestController
public class echartsControllor {
    @Autowired
    EchartsService echartsService;
    //1.最近七天销售额
    @GetMapping("/SevenDaySales")
    List<SevenDay> getSevenDaySales(){
        return echartsService.getSevenSales();
    }
    //2.15天毛利润
    @RequestMapping("/profit")
    List<SevenDay> getProfit(){
        return echartsService.getProfit();
    }
    //3.今日出货分类比例
    @RequestMapping("/category")
    List<Pie> getCategory(){
        return echartsService.getCategory();
    }
}
